1. Field of the Invention
This invention relates generally to the field of data communications and in particular to determining bit rates for data transfer.
2. Description of the State of the Art
In a data transfer operation, data transmitted at a particular bit rate from one end of a data link must be received at the same rate at the other end of the data link in order to avoid errors. Several techniques for automatic bit rate detection or “autobauding”, which ensures that a sending and receiving bit or data rate are the same, are currently known.
According to one known technique, a predetermined bit pattern, typically the ASCII code for the uppercase letter “A”, (0x41), along with a start bit and a stop bit, is sent from one end of a data link and received by a receiver at the other end of the data link. A data link between a processor and a modem in a communication device is one such data link for which autobauding is commonly employed. At the receiver, the received start bit, data bits, and stop bit are buffered, the duration of the start bit is determined using a local clock or timer, for example, and the sending bit rate is the determined from the duration of the start bit. If the stored bits are decoded as “A” using the determined bit rate, then the sending bit rate was correctly determined, and the bit rate at the receiver is set accordingly. However, this technique requires buffering of received data during bit rate detection.
Another bit rate detection scheme involves automatic retransmission by a sender, and trial and error bit rate selection at the receiver. During bit rate detection, the receiver is configured to expect a predetermined bit pattern on the data link. A particular bit rate is selected at the receiver, and the next received byte is detected using the selected bit rate. If the predetermined bit pattern is detected, then the selected bit rate is the same as the sending bit rate, the receiver maintains the selected bit rate, and sends a response, including the predetermined bit pattern, to the sender as an indication that the bit rate has been determined correctly. Otherwise, the receiver selects another bit rate and awaits a subsequent data byte from the sender. In the absence of a response from the receiver within a predetermined time, the sender retransmits the predetermined bit pattern to the receiver. This process is repeated until the sending bit rate is selected by the receiver. Bit rate detection according to this scheme may entail several bit rate selections and byte retransmissions, and as such is typically slow.